import request from '@/utils/request'

// 查询工程师用户列表
export function listEngineerUser(query) {
  return request({
    url: '/vanger/engineerUser/list',
    method: 'get',
    params: query
  })
}

// 查询工程师用户列表（联合）
export function listUnion(query) {
  return request({
    url: '/vanger/engineerUser/listUnion',
    method: 'get',
    params: query
  })
}


// 查询工程师用户详细（联合）
export function getInfoUnion(id) {
  return request({
    url: '/vanger/engineerUser/getInfoUnion/' + id,
    method: 'get'
  })
}

// 查询工程师用户详细
export function getEngineerUser(id) {
  return request({
    url: '/vanger/engineerUser/' + id,
    method: 'get'
  })
}

// 新增工程师用户
export function addEngineerUser(data) {
  return request({
    url: '/vanger/engineerUser',
    method: 'post',
    data: data
  })
}

// 修改工程师用户
export function updateEngineerUser(data) {
  return request({
    url: '/vanger/engineerUser',
    method: 'put',
    data: data
  })
}

// 删除工程师用户
export function delEngineerUser(id) {
  return request({
    url: '/vanger/engineerUser/' + id,
    method: 'delete'
  })
}


// 用户状态修改
export function changeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/vanger/engineerUser/changeStatus',
    method: 'put',
    data: data
  })
}